package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Commentait;
import cn.wolfcode.trip.base.mapper.CommentaitMapper;
import cn.wolfcode.trip.base.query.CommentaitQueryObject;
import cn.wolfcode.trip.base.service.ICommentaitService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentaitServiceImpl implements ICommentaitService {
    @Autowired
    private CommentaitMapper commentaitMapper;

    @Override
    public PageInfo getPageInfo(CommentaitQueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize() );
        List<Commentait> list = commentaitMapper.selectAll(qo);
        return new PageInfo(list);
    }
}
